#ifndef _ICFPC2008_MESSAGE_H_
#define _ICFPC2008_MESSAGE_H_

#include <list>
#include "mapobject.h"
#include "boulder.h"
#include "home.h"
#include "martian.h"
#include "crater.h"

class Message
{
public:
	char mType;
	//init message fields
	double mapX, mapY; //map size, meters
	unsigned long mapTimeLimit; //timelimit, msec
	double minSensor, maxSensor; //sensor limits, meters
	double maxLinearSpeed; //max linear speed, m/s
	double maxTurnSpeed; //turn speed, deg/s
	double maxHardTurnSpeed; //hard turn speed, deg/s
	
	unsigned long timestamp; //time from the beginning of the contest, msec
	unsigned long score; // earned score, points
	
	char vehicleSpeedState; //vehicle ctl, contains speed status
	char vehicleTurnState; //vehicle ctl, contains turn status
	double x, y; //vehicle position
	double turn; //vehicle direction
	double speed; //vehicle speed	
	std::list<MapObject*>* objList; //list of visible objects


	Message();
	void clear();
	int parse(char* msg);
	~Message();
};

#endif
